{{include template('public/header','admin')}}
<body>
    <script>
        //导入选中
        function collection_content_import() {
            if ($("input[name='ids[]']:checked").length < 1) {
                layer.alert('请勾选信息！');
                return false;
            }
            document.getElementById('cpform').action = '/collection/collection_content/collection_content_import';
            document.getElementById('cpform').submit();
        }
    </script>
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <div class="page-header">
                    <a href="javascript:;" onclick="layer_dels('ids')" class="btn btn-danger bar-btn">
                        <i class="fa fa-fw fa-plus"></i>批量删除
                    </a>
                    <a href="javascript:;" onclick="collection_content_import()" class="btn btn-primary radius">
                        <i class="Hui-iconfont">&#xe6a7;</i> 导入选中
                    </a>
                </div>
                <div class="search">
                    <div class="well">
                        <form action="/collection/collection_content/collection_list" method="get" class="form-inline" role="form">
                            <input type="hidden" value="search" name="a" />
                            <div class="form-group">
                                <label for="status">内容状态</label>
                                <select name="status" class="form-control">
                                    <option value="0" {{if $status==0 }}selected {{/if}}>未采集</option>
                                    <option value="1" {{if $status==1 }}selected {{/if}}>已采集</option>
                                    <option value="2" {{if $status==2 }}selected {{/if}}>已导入</option>
                                </select>
                                <select name="type" class="form-control">
                                    <option value="0">类型</option>
                                    <option value="1" {{if $type==1 }}selected {{/if}}>节点ID</option>
                                    <option value="2" {{if $type==2 }}selected {{/if}}>标题</option>
                                </select>
                                <input type="text" class="form-control" id="keyword" name="keyword" value="{{$keyword}}" maxlength="15" tabindex="2" />
                            </div>
                            <button type="submit" name="dosubmit" class="btn btn-primary"><i class="fa fa-search" aria-hidden="true"></i>{{L('search')}}</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <form method="post" action="/collection/collection_content/collection_list_del" id="cpform" class="form-inline" role="form">
                    <table class="table table-condensed table-hover table-striped tablesorter table-fixed table-selectable">
                        <thead>
                            <tr>
                            <tr class="text-c">
                                <th width="25"><input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll('prefix', this.form, 'ids')" /></th>
                                <th width="100">内容状态</th>
                                <th>标题</th>
                                <th>原文地址</th>
                            </tr>
                            </tr>
                        </thead>
                        <tbody>
                            {{foreach $items as $item}}
                            <tr>
                                <td><input type="checkbox" class="checkbox" name="ids[]" value="{{$item.id}}"></td>
                                <td class="{{$item.status}}">{{$item.level}}</td>
                                <td >{{$item.title}}</td>
                                <td ><a href="{{$item.url}}" target="_blank">{{$item.url}}</a></td>
                            </tr>
                            {{/foreach}}
                        </tbody>
                        <tr>
                            <td colspan="15">
                                <div style="text-align: left;">
                                    {{include template('public/page','admin')}}
                                </div>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
</body>
</html>